package com.ant.storage.mapper;

import com.ant.storage.dto.InventoryDto;
import com.ant.storage.pojo.Warehouse;
import com.ant.storage.vo.WarehouseAndCommodityVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author melon
 * @since 2022-03-16
 */
public interface WarehouseMapper extends BaseMapper<Warehouse> {

    List<WarehouseAndCommodityVo> warehouseAndCommodityList(@Param("id") Integer id,
                                                            @Param("pageIndex") Integer pageIndex,
                                                            @Param("pageSize") Integer pageSize,
                                                            @Param("commodityName") String commodityName,
                                                            @Param("commodityBarCode") String commodityBarCode,
                                                            @Param("commodityType") String commodityType  );
    Integer warehouseAndCommodityCount(@Param("id") Integer id,
                                       @Param("commodityName") String commodityName,
                                       @Param("commodityBarCode") String commodityBarCode,
                                       @Param("commodityType") String commodityType);

    List<WarehouseAndCommodityVo> warehouseRecordList(@Param("id") Integer id,
                                                      @Param("pageIndex") Integer pageIndex,
                                                      @Param("pageSize") Integer pageSize);

    Integer warehouseRecordTotal(@Param("id") Integer id);

    Integer warehouseAndCommodityTotal(@Param("id") Integer id);

    List<WarehouseAndCommodityVo> getInventoryByWarehouseId(InventoryDto dto);

    Integer getInventoryByWarehouseIdCount(InventoryDto dto);
}
